<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // 
      let arr = [
        { id: 1, age: 29, cunkuan: 100, hasMarried: false },
        { id: 1, age: 28, cunkuan: 200, hasMarried: true },
        { id: 1, age: 28, cunkuan: 200, hasMarried: true, fuerdai: true },
      ]; // every  some

      let res = arr.reduce((prev, current) => {
        return prev + current.cunkuan;
      }, 0);

      console.log(res);

      // http://abc.com/login.html   //split   lastIndexOf 20
      let str = 'http://abc.com/login.html';
      console.log(str.split('.').pop());
    </script>
  </body>
</html>
